/**
 * 
 */
package org.swing.utility.common.datetime;

import org.joda.time.DateTime;
import org.swing.utility.common.imp.DateTimeDuration;

/**
 * @author lqnhu
 *
 */
public class DateTimeDay extends DateTimePeriod {
	protected DateTimeDay(DateTime start, DateTime end) {
		super(start, end, DateTimeDuration.DAY, "yyyy-MM-dd", "MMMM d, yyyy",
				"yyyy-MM-dd", "dd");
	}

	public DateTimePeriod getNext() {
		DateTime next = getStart().plusDays(1);
		return DateTimePeriod.createDay(next);
	}

	public DateTimePeriod getPrevious() {
		DateTime previous = getStart().minusDays(1);
		return DateTimePeriod.createDay(previous);
	}

	public DateTimeDuration getDefaultSubDuration() {
		return DateTimeDuration.HOUR;
	}
}
